/**
 * Copyright &copy; 2015-2020 <a href="www.dsesa.cn/">ESA</a> All rights reserved.
 */
package com.jeeplus.modules.sys.entity;

import java.util.List;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.jeeplus.core.persistence.TreeEntity;

/**
 * 机构Entity
 * @author jeeplus
 * @version 2016-05-15
 */
public class Office extends TreeEntity<Office> {

	private static final long serialVersionUID = 1L;
//	private Area area;		// 归属区域
	private String code; 	// 机构编码
	private String type; 	// 机构类型（1：公司；2：部门；3：小组）
	private String grade; 	// 机构等级（1：一级；2：二级；3：三级；4：四级）
	private String address; // 联系地址
	private String zipCode; // 邮政编码
	private String master; 	// 负责人
	private String phone; 	// 电话
	private String fax; 	// 传真
	private String email; 	// 邮箱
	private String useable; //是否可用
	private String fullName; //全称
	private User primaryPerson;//大区经理
	private User deputyPerson;//区域经理
	private User zygly;//区域资源管理员
	private User zyzg;//区域资源主管
	private User jykj;//区域资源主管
	private User xszj;//销售总监

	private User jrkcy;//金融考察员
	private User swkj;//税务会计
	private User kpy;//开票员
	private User ddgly;//订单管理员
	private User xxgly;//信息管理员

	private List<String> childDeptList;//快速添加子部门
	private String [] ids;//多公司权限

	public Office(){
		super();
		this.type = "2";
	}

	public Office(String id){
		super(id);
	}
	
	public List<String> getChildDeptList() {
		return childDeptList;
	}

	public void setChildDeptList(List<String> childDeptList) {
		this.childDeptList = childDeptList;
	}

	public String getUseable() {
		return useable;
	}

	public void setUseable(String useable) {
		this.useable = useable;
	}

	public User getPrimaryPerson() {
		return primaryPerson;
	}

	public void setPrimaryPerson(User primaryPerson) {
		this.primaryPerson = primaryPerson;
	}

	public User getDeputyPerson() {
		return deputyPerson;
	}

	public void setDeputyPerson(User deputyPerson) {
		this.deputyPerson = deputyPerson;
	}

	public Office getParent() {
		return parent;
	}

	public void setParent(Office parent) {
		this.parent = parent;
	}

//	@NotNull
//	public Area getArea() {
//		return area;
//	}
//
//	public void setArea(Area area) {
//		this.area = area;
//	}
	@Length(min=1, max=1)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Length(min=1, max=1)
	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	@Length(min=0, max=255)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Length(min=0, max=100)
	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	@Length(min=0, max=100)
	public String getMaster() {
		return master;
	}

	public void setMaster(String master) {
		this.master = master;
	}

	@Length(min=0, max=200)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Length(min=0, max=200)
	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Length(min=0, max=200)
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Length(min=0, max=100)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public String toString() {
		return name;
	}

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String[] getIds() {
		return ids;
	}

	public void setIds(String[] ids) {
		this.ids = ids;
	}

	public User getZygly() {
		return zygly;
	}

	public void setZygly(User zygly) {
		this.zygly = zygly;
	}

	public User getZyzg() {
		return zyzg;
	}

	public void setZyzg(User zyzg) {
		this.zyzg = zyzg;
	}

	public User getJykj() {
		return jykj;
	}

	public void setJykj(User jykj) {
		this.jykj = jykj;
	}

	public User getXszj() {
		return xszj;
	}

	public void setXszj(User xszj) {
		this.xszj = xszj;
	}

	public User getJrkcy() {
		return jrkcy;
	}

	public void setJrkcy(User jrkcy) {
		this.jrkcy = jrkcy;
	}

	public User getSwkj() {
		return swkj;
	}

	public void setSwkj(User swkj) {
		this.swkj = swkj;
	}

	public User getKpy() {
		return kpy;
	}

	public void setKpy(User kpy) {
		this.kpy = kpy;
	}

	public User getDdgly() {
		return ddgly;
	}

	public void setDdgly(User ddgly) {
		this.ddgly = ddgly;
	}

	public User getXxgly() {
		return xxgly;
	}

	public void setXxgly(User xxgly) {
		this.xxgly = xxgly;
	}
}